<%@ page import="java.sql.Statement" import="java.sql.ResultSet" import="java.sql.Connection" %> 
<%@page import="connection.DBConnection"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Ledger Report</title>

<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<link href="globalCSS.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">

<style>
	div.combobox	{font-family: Tahoma;font-size: 12px}
	div.combobox	{position: relative;zoom: 1}
	div.center	{margin-left:300; margin-right: auto; width:5em; }
	div.combobox	div.dropdownlist	{display: none;width: 200px;
		border: solid 1px #000;background-color: #fff;
		height: 200px;overflow: auto;position: absolute;
		top: 18px;left: 0px;}
	div.combobox	.dropdownlist	p	{display: block;text-decoration: none;
		color: #000;padding: 1px;height: 1em;cursor: default}
	div.combobox	.dropdownlist	p.light	{color: #fff;
		background-color: #007}
	div.combobox	.dropdownlist, input {font-family: Tahoma;font-size: 12px;}
	div.combobox	input {float: left;width: 182px;
		border: solid 1px #ccc;height: 15px}
	div.combobox	span	{border: solid 1px #ccc;background: #eee;
		width: 16px;height: 17px;
		float: left;text-align: center;border-left: none;cursor: default}
</style>
</head>
<body>

<form name="ledgerreport" action="LedgerReport">

<div class="combobox">
<input type="text" name="comboboxfieldname" id="cb_identifier">

	<span>\/</span>
	<div class="dropdownlist">

<%
 
		DBConnection dbc=new DBConnection();
		Connection con=dbc.getNewConnection();
		Statement st = null;
		ResultSet rs = null;   
		
		try
   		{
		   st=con.createStatement();
		   
		   rs=st.executeQuery("SELECT name,code from ((SELECT cname as name, ccode as code FROM CustomerMaster where status=1) UNION ALL (SELECT sname as name, scode as code FROM SupplierMaster where status=1) UNION ALL (SELECT gname as name, gcode as code FROM GeneralLedger2) UNION ALL (SELECT bname as name, bnum as code FROM BankMaster) order by name)p ;");
		   while(rs.next())
		   {
		       String c1=rs.getString(1); // group name
			   String c2=rs.getString(2);
%>
				<p><%=c1 %> </p>
				
<%		       
				
		   }
   		}
		catch(Exception e) {}
%>
			<p> Sales Net Amount</p>
			<p> Sales Tax Amount</p>
			<p> Sales Transport Amount</p>
			<p> Purchase Net Amount</p>
			<p> Purchase Tax Amount</p>
			<p> Purchase Transport Amount</p>
			<p> Purchase Other Costs </p>
			
	</div>
</div>
<input type="submit" name="ledgername" value="Open" >


<script type="text/javascript" charset="utf-8" src="combobox.js"></script>
<script type="text/javascript" charset="utf-8">

var no = new ComboBox('cb_identifier');
</script>

</form>

</body>
</html>